<nav class="navbar navbar-expand-sm navbar-dark bg-dark fixed-top">
    <div class="container-fluid">
        <a class="navbar-brand" href="{{ url('/') }}">
            {{ $server->name }}
        </a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarResponsive">
            @if($server->endTime && $server->endTime < now() && !config('conf.serverFree'))
            @else
                <ul class="navbar-nav">
                    {{--<li class="nav-item">
                        <a class="nav-link text-white text-center" href="{{ url('config') }}">特色配置</a>
                    </li>--}}
                    @if($server->ext['showRank']==1)
                    <li class="nav-item">
                        <a class="nav-link text-white text-center" href="{{ url('rank') }}">排行榜</a>
                    </li>
                    @endif
                    {{--<li class="nav-item">
                        <a class="nav-link text-white text-center" href="{{ url('video') }}">游戏视频</a>
                    </li>--}}
                </ul>
            <ul class="navbar-nav ml-auto">

                @if(!session('player'))
                    <li class="nav-item bg-danger ml-sm-1 rounded">
                        <a class="nav-link text-white text-center" href="{{ url('login') }}">登录</a>
                    </li>
                    @if (Route::has('register'))
                        <li class="nav-item bg-danger ml-sm-1 rounded">
                            <a class="nav-link text-white text-center" href="{{ url('register') }}">注册</a>
                        </li>
                    @endif
                @else
                    {{--<div class="dropdown">
                        <button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        {{ json_decode( session('player'))->username }} ({{ $money }})
                        </button>
                        <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
                            <a class="dropdown-item" href="{{ url('/user/center') }}">角色列表</a>
                            <a class="dropdown-item" href="{{ url('/user/recharge') }}">余额充值</a>
                        </div>
                    </div>--}}
                    <li class="nav-item bg-danger ml-sm-1 rounded">
                        <a class="nav-link text-white text-center" href="{{ url('/user/center') }}" style="text-transform:lowercase">
                            {{ json_decode( session('player'))->username }}
                        </a>
                    </li>

                    @if($server->business==1)

                        @if($server->ext['showMoney']==1)
                        <li class="nav-item bg-danger ml-sm-1 rounded">
                            <a class="nav-link text-white text-center money" href="{{ url('/user/recharge') }}">积分：{{(int) \App\Models\Account::getAccount($server)->money }}</a>
                        </li>
                        @endif
                        @if($server->ext['showRecommend']==1)
                        <li class="nav-item bg-danger ml-sm-1 rounded">
                            <a class="nav-link text-white text-center" href="{{ url('/user/recommend') }}">推广</a>
                        </li>
                        @endif
                        @if($server->ext['showMall']==1)
                        <li class="nav-item bg-danger ml-sm-1 rounded">
                            <a class="nav-link text-white text-center" href="{{ url('/user/mall') }}">商城</a>
                        </li>
                        @endif

                        @if($server->spellMall && $server->spellMall->status==1)
                        <li class="nav-item bg-danger ml-sm-1 rounded">
                            <a class="nav-link text-white text-center" href="{{ url('/user/mallspell') }}">技能树</a>
                        </li>
                        @endif

                    @endif
                    <li class="nav-item bg-danger ml-sm-1 rounded">
                        <a class="nav-link text-white text-center" href="{{ url('/user/changePwd') }}">修改密码</a>
                    </li>
                    <li class="nav-item bg-danger ml-sm-1 rounded">
                        <a class="nav-link text-white text-center" href="{{ url('/user/logout') }}">退出</a>
                    </li>

                @endif
            </ul>
            @endif
        </div>
    </div>
</nav>
